package com.lqd.mall.sso;

import com.lqd.mall.basis.response.CommonResult;
import com.lqd.mall.basis.response.Result;
import com.lqd.mall.interaction.sso.vo.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author 零起点
 * @create 2022-02-13 9:27
 */
@Api(tags = "认证管理")
@RequestMapping("auth")
public interface AuthControllerApi {
    /**
     * 用户登录接口
     * @param loginVo
     * @return
     */
    @ApiOperation(value = "用户登录")
    @PostMapping("login")
    Result<Map<String,Object>> login(@RequestBody LoginVo loginVo);
    /**
     * 用户登录接口
     * @param request
     * @return
     */
    @ApiOperation(value = "用户登录")
    @DeleteMapping("logout")
    CommonResult logout(HttpServletRequest request);


    @PostMapping("refresh")
    CommonResult refresh(HttpServletRequest request);
}
